package com.jiyun.controller;

import com.cn.jiyun.entity.pojo.Club;
import com.jiyun.result.Result;
import com.jiyun.service.ClubService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/club")
public class ClubController {
    @Autowired
    private ClubService clubService;

    @RequestMapping("/findAll")
    public Result<List<Club>> findAll(){
        List<Club> clubList = clubService.findAll();
        return Result.ok(clubList);
    }
}
